package com.tang.common.feign;

import com.tang.common.entity.UserEntity;
import com.tang.common.vo.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "user-center",path = "/userCenter")
public interface UserCenterFeign {
    /**
     * 根据用户名查询用户信息
     */
    @GetMapping("/user/getByUserName/{userName}")
    R<UserEntity> getByUserName(@PathVariable("userName") String userName);

    /**
     * 认证
     */
    @GetMapping("/user/auth")
    R auth(@RequestParam("token") String token);
}
